package com.maktoub.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.maktoub.common.model.entity.UserInterfaceInfo;
import com.maktoub.project.model.dto.UserInterfaceInfo.UserInterfaceInfoQueryRequest;
import com.maktoub.project.model.vo.UserInterfaceInfoExcludedVO;
import com.maktoub.project.model.vo.UserInterfaceInfoVO;
import com.maktoub.project.model.vo.analysi.totalapply.InterfaceTotalApplyVO;
import com.maktoub.project.model.vo.analysi.applyRecord.InterfaceApplyRecordColum;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Maktoub
 * @description 针对表【user_interface_info(用户接口调用)】的数据库操作Mapper
 * @createDate 2024-05-16 19:11:10
 * @Entity com.maktoub.project.model.entity.UserInterfaceInfo
 */
public interface UserInterfaceInfoMapper extends BaseMapper<UserInterfaceInfo> {

    int updateCountByAkInterfaceId(@Param("accessKey") String accessKey,
                                   @Param("id") Long interfaceId);

    UserInterfaceInfo queryNumByAkInterfaceId(@Param("accessKey") String accessKey,
                                              @Param("id") Long interfaceId);

//    List<UserInterfaceInfoVO> selectByUserId(@Param("name") String name, @Param("status") int status,
//                                             @Param("userId") long userId, @Param("current") int current,
//                                             @Param("pageSize") int pageSize);
    List<UserInterfaceInfoVO> selectByUserId(UserInterfaceInfoQueryRequest userInterfaceInfoQueryRequest);
    List<UserInterfaceInfoExcludedVO> selectByExcluedUserId(UserInterfaceInfoQueryRequest userInterfaceInfoQueryRequest);
    long selectByExcluedUserIdCount(UserInterfaceInfoQueryRequest userInterfaceInfoQueryRequest);

    List<InterfaceTotalApplyVO> selectInterfaceTotalCount();
    List<InterfaceApplyRecordColum> selectRecordsByDate();
    List<InterfaceApplyRecordColum> selectRecordsByDateForUser(Long id);


    Long selectSumTotalNum();
}




